#include <stdio.h>
#include <unistd.h>


int main()
{
    pid_t pid = fork();
    if(pid < 0)
    {
        perror("fork()");
    }
    else if(pid == 0)
    {
        printf("i am child\n");
    }
    else 
    {
        while(1)
        {
            printf("i am father\n");
            sleep(1);
        }
    }
    return 0;
}
